<include file="./Tpl/Home/top.html"/>
<include file="./Tpl/Home/header.html" />
<!--交易页面的子导航区-->
<div  style="border-top:1px solid #ddd;"></div>
<div class="container">
<!--全站交易记录-->
<div class="trade-part trade-part-hd mt20">
  <div class="md">
	<div class="my-grid" id="order-grid">
		<div class="fact_info">
		    <div class="fact_info_left">
				<div class="login_tit">造币工厂</div>
					<table cellspacing=0 cellpadding=0 border=0>
						<tr><td>现有币总数</td><td>前一天造币总数</td></tr>
						<tr><td>{$allnum|default=0}</td><td>{$lastnum|default=0}</td></tr>
					</table>
				<div class="login_tit">我的造币</div>
				<div class="factb">
					<table cellspacing=0 cellpadding=0 border=0>
						<tr><td>日期</td><td>造币数量</td><td>结算数量</td></tr>
						<volist name="list" id="vo">
						<tr><td>{$vo.addtime}</td><td>{$vo.coin}</td><td>{$vo.ablecoin}</td></tr>
						</volist>
					</table>
				</div>
			</div>
            <div class="fact_info_right">
			    <input type="button" value="开始造币" id="start" class="btn"/>
				<div class="fact_line">您现在已造出：<input type="text" value="0" id="val" readonly/></div>
				<div class="fact_line" id="ts">&nbsp;</div>
				<div>
				{$fact.content}
				</div>
			</div>
			<div class="clear"></div>
		</div>
	</div>
  </div>
</div>
</div>
<!--尾部-->
<include file="./Tpl/Home/footer.html" />
<!-- footer -->

<div class="modal hide fade" id="modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"></div>

<!--[if IE 6]><script src="/js/ie-6.js"></script><![endif]-->
<script type="text/javascript" src="/Public/Home/js/jquery.SuperSlide.js"></script>
<script type="text/javascript" src="/Public/Home/js/slideTxtBox.js"></script>
<script type="text/javascript" src="/Public/Home/js/bootbox.js"></script>
<script type="text/javascript" src="/Public/Home/js/box.js"></script>
<script type="text/javascript" src="/Public/Home/js/lang.js"></script>
<script type="text/javascript" src="/Public/Home/js/responseHandler.js"></script>
<script type="text/javascript" src="/Public/Home/js/jquery.yiigridview.js"></script>
<script type="text/javascript">
/*<![CDATA[*/
jQuery(function($) {
jQuery('body').popover({'selector':'a[rel=popover]'});
jQuery('#order-grid').yiiGridView({'ajaxUpdate':['order-grid'],'ajaxVar':'ajax','pagerClass':'pagination','loadingClass':'grid-view-loading','filterClass':'filters','tableClass':'items table table-striped table-bordered table-condensed','selectableRows':1,'enableHistory':false,'updateSelector':'{page}, {sort}','filterSelector':'{filter}','pageVar':'CurrencyTransaction_page'});
});
/*]]>*/




$(document).ready(function(){
	var tid = {$typeid};
	var yield = parseFloat({$yield});
	$('#start').click(function(){
		if(yield > 0){
			rr = setInterval(function(){
				$.post("{$path}/User/work",{y:yield,t:tid},function(a){
					 
					var v = parseFloat($("#val").val())+yield;
					v = String(v);
					var pos = v.indexOf('.');
					if(pos != -1){
						len = v.substring(pos+1,v.length);
						if(len.length > 6) {
							v = v.substring(0,pos) + '.' + v.substring(pos+1,pos+7);
						}
					}

					$("#val").val(v);
				});
			},60000);
		}
		$(this).val('造币中');
		$(this).attr('disabled','disabled');
		$('#ts').text('造币中，请保持此窗口不关闭。');
	});
});
</script>
</body>
</html>